//
//  Fraction.h
//  02-ClassAndObject
//
//  Created by 李昊林 on 16/7/5.
//  Copyright © 2016年 李昊林. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Fraction : NSObject

@property (nonatomic,assign) NSInteger numerator;
@property (nonatomic,assign) NSInteger denominator;
//@property (nonatomic,assign) NSInteger frac1;
//@property (nonatomic,assign) NSInteger frac2;

- (instancetype)initWithNumerator:(NSInteger)numerator
                      denominator:(NSInteger)denominator;

+ (instancetype)fractionWithNumerator:(NSInteger)numerator
                          denominator:(NSInteger)denominator;


- (Fraction *)addWith:(Fraction *)anotherFraction;
- (Fraction *)subWith:(Fraction *)anotherFraction;
- (Fraction *)mulWith:(Fraction *)anotherFraction;
- (Fraction *)divWith:(Fraction *)anotherFraction;

- (NSInteger)gysWithNumber1:(NSInteger)number1
                    Number2:(NSInteger)number2;

- (void)output;
- (void)reduction;
- (void)comFraction:(Fraction *)number1 ;
- (NSComparisonResult)compare:(Fraction *)number1;

















@end
